package com.financing.platform.service.impl;


import com.financing.platform.dao.IFpOrderBizLogDao;
import com.financing.platform.dto.FpOrderBizLogDTO;
import com.financing.platform.service.IFpOrderBizLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.sql.SQLException;
import java.util.List;


/**
 * fp_order_biz_log  
 * 业务数据日志 业务访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpOrderBizLogService")
public class FpOrderBizLogServiceImpl implements IFpOrderBizLogService {

	@Autowired
	private IFpOrderBizLogDao fpOrderBizLogDao;

	@Override
	public int insert(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		return fpOrderBizLogDao.insert(fpOrderBizLog);
	}

	@Override
	public void update(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		fpOrderBizLogDao.update(fpOrderBizLog);
	}

	@Override
	public void updateForce(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {

		fpOrderBizLogDao.updateForce(fpOrderBizLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		fpOrderBizLogDao.delete(id);
	}
	
	@Override
	public List<FpOrderBizLogDTO> queryList(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		return fpOrderBizLogDao.queryList(fpOrderBizLog);
	}

	@Override
	public int queryListCount(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		return fpOrderBizLogDao.queryListCount(fpOrderBizLog);
	}

	@Override
	public FpOrderBizLogDTO loadById(Integer id) throws SQLException {
		return fpOrderBizLogDao.loadById(id);
	}
 	@Override
	public FpOrderBizLogDTO queryListGetFirst(FpOrderBizLogDTO fpOrderBizLog)
			throws SQLException {
		 List<FpOrderBizLogDTO> queryList = queryList(fpOrderBizLog);
		 if(queryList==null||queryList.size()==0){
			 return new FpOrderBizLogDTO();
		 }
		 return queryList.get(0);
	}
}
